package com.cxc.java8;

import sun.security.krb5.internal.APOptions;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.function.Function;

public class LambadExpression {


    public static void main(String[] args) {

        Comparator<Apple> comparator = new Comparator<Apple>() {
            @Override
            public int compare(Apple o1, Apple o2) {
                return o1.getColor().compareTo(o2.getColor());
            }
        };

        List<Apple> list = Collections.emptyList();
        list.sort(comparator);

        Comparator<Apple> comparator2 = (o1,o2)-> o1.getColor().compareTo(o2.getColor());

        Function<String,Integer>  flambda =  s -> s.length();



    }


}
